package com.engine.salary.enums;


import java.util.Objects;

/**
 * @description: 税率表表单类型
 * @author: xiajun
 * @modified By: xiajun
 * @date: Created in 10/19/21 4:05 PM
 * @version:v1.0
 */
public enum SalarySystemTypeEnum implements BaseEnum<Integer> {

    CUSTOM(0, "自定义表单", 83993),
    SYSTEM(1, "系统表单", 83994),
    ;

    private int value;

    private String defaultLabel;

    private int labelId;

    SalarySystemTypeEnum(int value, String defaultLabel, int labelId) {
        this.value = value;
        this.defaultLabel = defaultLabel;
        this.labelId = labelId;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDefaultLabel() {
        return defaultLabel;
    }

    @Override
    public Integer getLabelId() {
        return labelId;
    }

    public static SalarySystemTypeEnum parseByValue(int value) {
        for (SalarySystemTypeEnum typeEnum : SalarySystemTypeEnum.values()) {
            if (Objects.equals(typeEnum.getValue(), value)) {
                return typeEnum;
            }
        }
        return null;
    }
}
